/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kwic;

import java.util.Scanner;

/**
 *
 * @author Tom
 */
public class Input {
    private ILineStorage lineStorage;

    public Input(ILineStorage lineStorage) {
        this.lineStorage = lineStorage;
    }
    
    public void read(){
        System.out.println("Type text, end of line finish by ENTER, end of stream finish by: . (dot)  on clear line");
        Scanner sc = new Scanner(System.in);
        String line;
        while (!(line = sc.nextLine()).equals(".")) {
            lineStorage.addLine(line);
        }  
    }
    
}
